<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<s:form action="%{action}" method="post" name="form" id="form">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<s:hidden name="pageAction" value="%{pageAction}" />
<s:set name="pageAction"  value="%{pageAction}" />
	<tr>
		<td>
			<div class="blue-text16" style="margin: 0px 0px 0px 0px">
			<s:text name="addNotes.addnote" />
			</div>
			<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
			<div style="margin: 0px 0px 12px 0px">
				<form name="addnote" method="post" action="#">
					<table class="line" cellpadding="2" cellspacing="2" width="100%">


						<tbody>
							<tr>
								<td width="10%" align="right" class="search-text">
									<b class="common-bold-text"><s:text name="addCompanyProfileToFavorite.category" /></b>
								</td>
								<td>
									<b class="common-bold-text">
									<s:if test="itemCategoriesList != null">
										<s:iterator value="itemCategoriesList" status="row">
											<s:property value="categoryId.categoryName" /> 
											 <s:if test="#row.last != true"> ,</s:if> 
										</s:iterator>
									</s:if>
									<s:if test="wonlist != null">
										<s:hidden name="wonlist.id" value="%{wonlist.id}" /> <s:property value="itemNote.items.generalCategories.categoryName" />
									</s:if>
									<s:if test="itemNote != null">
										<s:hidden name="itemNote.id" value="%{itemNote.id}" /> <s:property value="itemNote.items.generalCategories.categoryName" />
									</s:if>
									<s:if test="items != null">
										<s:hidden name="items.itemId" value="%{items.itemId}" /> <s:property value="items.generalCategories.categoryName" />
									</s:if>
									<s:if test="title != null && title == 'Users'">
										<s:hidden name="id" value="%{userFavoritesUsers.id}" /> <s:property value="userFavoritesUsers.userIdFav.userId" />
									</s:if>
									<s:elseif test="title != null && title == 'Shops'">
										<s:hidden name="id" value="%{userFavoritesShops.id}" /> <s:property value="userFavoritesShops.name" />
									</s:elseif>
									<s:elseif test="title != null && title == 'Profiles'">
										<s:hidden name="id" value="%{userFavoritesProfile.id}" /> <s:property value="userFavoritesProfile.name" />
									</s:elseif>
									<s:elseif test="title != null && title == 'Categories'">
										<s:hidden name="id" value="%{userFavoritesCategory.id}" /> <s:property value="userFavoritesCategory.generalCategories.categoryName" />
									</s:elseif>
									<s:elseif test="title != null && title == 'Searches'">
										<s:hidden name="id" value="%{userFavoritesSearch.id}" /> <s:property value="userFavoritesSearch.name" />
									</s:elseif>
									</b>
								</td>
							</tr>
							<tr>
								<td class="search-text" align="right">
									<b class="common-bold-text"><s:text name="addNotes.addnote" /></b>
								</td>
								<td>
							<s:if test="wonlist != null">
									<s:textarea cssClass="textfield" name="wonlist.note" value="%{wonlist.note}" cols="40" rows="4" />
							</s:if>
							<s:elseif test="itemNote != null">
									<s:textarea cssClass="textfield" name="itemNote.note" value="%{itemNote.note}" cols="40" rows="4" />
							</s:elseif>
							<s:elseif test="items != null">
									<s:textarea cssClass="textfield" name="itemNote.note" value="%{itemNote.note}" cols="40" rows="4" />
							</s:elseif>
							<s:elseif test="title != null && title == 'Users'">
									<s:textarea cssClass="textfield" name="note" value="%{userFavoritesUsers.note}" cols="40" rows="4" />
							</s:elseif>
							<s:elseif test="title != null && title == 'Shops'">
									<s:textarea cssClass="textfield" name="note" value="%{userFavoritesShops.note}" cols="40" rows="4" />
							</s:elseif>
							<s:elseif test="title != null && title == 'Profiles'">
									<s:textarea cssClass="textfield" name="note" value="%{userFavoritesProfile.note}" cols="40" rows="4" />
							</s:elseif>
							<s:elseif test="title != null && title == 'Categories'">
								<s:textarea cssClass="textfield" name="note" value="%{userFavoritesCategory.note}" cols="40" rows="4" />
							</s:elseif>
							<s:elseif test="title != null && title == 'Searches'">
								<s:textarea cssClass="textfield" name="note" value="%{userFavoritesSearch.note}" cols="40" rows="4" />
							</s:elseif>
								</td>
							</tr>

							<tr>
								<td width="100%" align="center" colspan="2">
									<table width="100%">
										<tr>
											<td align="right">
												<table border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
														<td class="btn-grey-middle1 "><s:submit value="Save" theme="simple" cssClass="submit-btn-common" /></td>
														<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
													</tr>
												</table>
											</td>
											<td align="left">
												<table border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
														<td class="btn-grey-middle1 ">
															<s:if test="title != null && title == 'Users'">
																<s:submit value="Cancel" theme="simple" cssClass="submit-btn-common" action="favoriteUsers" />
															</s:if>
															<s:elseif test="title != null && title == 'Shops'">
																<s:submit value="Cancel" theme="simple" cssClass="submit-btn-common" action="favoriteShops" />
															</s:elseif>
															<s:elseif test="title != null && title == 'Profiles'">
																<s:submit value="Cancel" theme="simple" cssClass="submit-btn-common" action="favoriteProfile" />
															</s:elseif>
															<s:elseif test="title != null && title == 'Categories'">
																<s:submit value="Cancel" theme="simple" cssClass="submit-btn-common" action="favoriteCategories" />
															</s:elseif>
															<s:elseif test="title != null && title == 'Searches'">
																<s:submit value="Cancel" theme="simple" cssClass="submit-btn-common" action="favoriteSearches" />
															</s:elseif>
															<s:else>
																<s:reset value="Cancel" theme="simple" cssClass="submit-btn-common" />
															</s:else>
														</td>
														<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</form>
			</div>
		</td>
	</tr>
</table>
</s:form>